
local inspect = require('inspect')

if abilities == nil then
	abilities = {} -- Creates an array to let us beable to index itemFunctions when creating new functions
	abilities.__index = abilities
end
 
function abilities:new() -- Creates the new class
	print('[abilities] new started!')
	o = o or {}
	setmetatable( o, abilities )
	return o
end
 
function abilities:start() -- Runs whenever the itemFunctions.lua is ran
	print('[abilities] abilities started!')
end
 
function addSpell(keys) -- keys is the information sent by the ability
	local Unit = EntIndexToHScript( keys.caster_entindex )
	if(Unit:FindAbilityByName(keys.AbilityName) == nil) then
		Unit:AddAbility(keys.AbilityName)
		Unit:FindAbilityByName(keys.AbilityName):UpgradeAbility()
	end
end